package com.sec.bnjey.vo;

import android.database.Cursor;

public class DriveDetailEntity {

	public int vid;
	public int starttime;
	public int endtime;
	public int mileage;
	public int maxVss;
	public int supBat; // song
	public int avgBat;
	public int minBat;
	public int maxBat;
	public int supCool; // song
	public int avgCool;
	public int maxCool;
	public int supEngine; // song
	public int avgEngine;
	public int maxEngine;
	public int supEff; // song
	public int avgEff;
	public int supfuelUse; // song
	public int fuelUse;
	public int decelCnt;
	public int accelCnt;
	public int avgVss;
	public int idling;
	public int maxRpm;

	public Long drivingTimeSec; // sj.okay

	public DriveDetailEntity() {

	}

	public void reset() {

		vid = 0;
		starttime = 0;
		endtime = 0;
		mileage = 0;
		maxVss = 0;
		supBat = 0; // song
		avgBat = 0;
		minBat = 0;
		maxBat = 0;
		supCool = 0; // song
		avgCool = 0;
		maxCool = 0;
		supEngine = 0; // song
		avgEngine = 0;
		maxEngine = 0;
		supEff = 0; // song
		avgEff = 0;
		supfuelUse = 0; // song
		fuelUse = 0;
		decelCnt = 0;
		accelCnt = 0;
		avgVss = 0;
		idling = 0;
		maxRpm = 0;

		drivingTimeSec = (long) 0;
	}

	public DriveDetailEntity(Cursor cursor) {


		vid = cursor.getInt(0);
		starttime = cursor.getInt(1);
		endtime = cursor.getInt(2);
		mileage = cursor.getInt(3);
		maxVss = cursor.getInt(4);
		supBat = cursor.getInt(5);
		maxBat = cursor.getInt(6);
		minBat = cursor.getInt(7);
		avgBat = cursor.getInt(8);
		supCool = cursor.getInt(9);

		maxCool = cursor.getInt(10);
		avgCool = cursor.getInt(11);
		supEngine = cursor.getInt(12);
		maxEngine = cursor.getInt(13);
		avgEngine = cursor.getInt(14);
		supEff = cursor.getInt(15);
		avgEff = cursor.getInt(16);
		supfuelUse = cursor.getInt(17);
		fuelUse = cursor.getInt(18);
		accelCnt = cursor.getInt(19);
		decelCnt = cursor.getInt(20);
		maxRpm = cursor.getInt(21);
		avgVss = cursor.getInt(22);
		idling = cursor.getInt(23);

	}

	public String toParamString() {

		StringBuffer buffer = new StringBuffer();

		buffer.append("index").append("=").append(vid).append("&");// �ð�
		buffer.append("start_time").append("=").append(starttime).append("&");// ����ð�
		buffer.append("end_time").append("=").append(endtime).append("&");// ����ð�
		buffer.append("mileage").append("=").append(mileage).append("&");// ����Ÿ�
		buffer.append("max_vss").append("=").append(maxVss).append("&");// �ִ�ӵ�
		buffer.append("avg_bat").append("=").append(avgBat).append("&");// ���͸�������
		buffer.append("min_bat").append("=").append(minBat).append("&");// ���͸��������
		buffer.append("max_bat").append("=").append(maxBat).append("&");// ���͸��ִ����
		buffer.append("avg_cool").append("=").append(avgCool).append("&");// �ð�����տµ�
		buffer.append("max_cool").append("=").append(maxCool).append("&");// �ð����ִ�µ�
		buffer.append("avg_engine").append("=").append(avgEngine).append("&");// ������տµ�
		buffer.append("max_engine").append("=").append(maxEngine).append("&");// �����ִ�µ�
		buffer.append("avg_eff").append("=").append(avgEff).append("&");// ��տ���
		buffer.append("fuel_use").append("=").append(fuelUse).append("&");// ����Ҹ�
		buffer.append("decel_cnt").append("=").append(decelCnt).append("&");// �ް���Ƚ��
		buffer.append("accel_cnt").append("=").append(accelCnt).append("&");// �ް���Ƚ��
		buffer.append("avg_vss").append("=").append(avgVss).append("&");// ��ռӵ�
		buffer.append("idling").append("=").append(idling).append("&");// ��ȸ��ð�
		buffer.append("max_rpm").append("=").append(maxRpm);// �ְ�RPM
		// buffer.append("idling").append("=").append(idling);

		return buffer.toString();
	}

	public int getIndex() {
		return vid;
	}

	public void setIndex(int index) {
		this.vid = index;
	}

	public int getStarttime() {
		return starttime;
	}

	public void setStarttime(int starttime) {
		this.starttime = starttime;
	}

	public int getEndtime() {
		return endtime;
	}

	public void setEndtime(int endtime) {
		this.endtime = endtime;
	}

	public int getMileage() {
		return mileage;
	}

	public void setMileage(int mileage) {
		this.mileage = mileage;
	}

	public int getMaxVss() {
		return maxVss;
	}

	public void setMaxVss(int maxVss) {
		this.maxVss = maxVss;
	}

	public int getAvgBat() {
		return avgBat;
	}

	public void setAvgBat(int avgBat) {
		this.avgBat = avgBat;
	}

	public int getMinBat() {
		return minBat;
	}

	public void setMinBat(int minBat) {
		this.minBat = minBat;
	}

	public int getMaxBat() {
		return maxBat;
	}

	public void setMaxBat(int maxBat) {
		this.maxBat = maxBat;
	}

	public int getAvgCool() {
		return avgCool;
	}

	public void setAvgCool(int avgCool) {
		this.avgCool = avgCool;
	}

	public int getMaxCool() {
		return maxCool;
	}

	public void setMaxCool(int maxCool) {
		this.maxCool = maxCool;
	}

	public int getAvgEngine() {
		return avgEngine;
	}

	public void setAvgEngine(int avgEngine) {
		this.avgEngine = avgEngine;
	}

	public int getMaxEngine() {
		return maxEngine;
	}

	public void setMaxEngine(int maxEngine) {
		this.maxEngine = maxEngine;
	}

	public int getAvgEff() {
		return avgEff;
	}

	public void setAvgEff(int avgEff) {
		this.avgEff = avgEff;
	}

	public int getFuelUse() {
		return fuelUse;
	}

	public void setFuelUse(int fuelUse) {
		this.fuelUse = fuelUse;
	}

	public int getDecelCnt() {
		return decelCnt;
	}

	public void setDecelCnt(int decelCnt) {
		this.decelCnt = decelCnt;
	}

	public int getAccelCnt() {
		return accelCnt;
	}

	public void setAccelCnt(int accelCnt) {
		this.accelCnt = accelCnt;
	}

	public int getMaxRpm() {
		return maxRpm;
	}

	public void setMaxRpm(int maxRpm) {
		this.maxRpm = maxRpm;
	}

	public int getAvgVss() {
		return avgVss;
	}

	public void setAvgVss(int avgVss) {
		this.avgVss = avgVss;
	}

	public int getIdling() {
		return idling;
	}

	public void setIdling(int idling) {
		this.idling = idling;
	}

}
